<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
	<meta content="text/html; charset=iso-8859-1" http-equiv="content-type">
	<meta content="Davide Rognoni" name="author">
	<meta content="Iron, Python, Web, Browser" name="keywords">
	<meta content="IronBrowser - Iron Python Web Browser" name="description">
	<meta content="all" name="robots">
	<title>IronBrowser - Iron Python Web Browser</title>
<script type="text/javascript">
function py(id, input) {
	var script = document.getElementById(id).value;
	return window.external.py(script, input);
}
function test(message) {
	alert(message);
}
</script>
	<style type="text/css">
		BODY {padding: 20px; background-color: white;}
		PRE {padding:10px; background-color: #dddddd;}
		CODE {background-color: #dddddd;}
		TEXTAREA {background-color: #aaaaaa;}
		.section {border-bottom: 1px solid #888888;}
	</style>
</head>
<body>
<div id="content">
<pre>
IronBrowser - Iron Python Web Browser (version 0.0.3 - 2008.05.17)
'The dangerouse exploration'


Public domain (P) 2008 Davide Rognoni

DAVIDE ROGNONI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL DAVIDE ROGNONI BE LIABLE FOR
ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.

E-mail: davide.rognoni@gmail.com
</pre>
<div style="padding: 10px; border: 2px solid red; color: red">
<h1>Attention!!! Danger!!!</h1>
IronBrowser allows the execution of Python scripts on your computer. Bad scripts can read/modify/delete your data and to destroy your system.
The best way to use this software is to navigate on secure HTML/web pages.
</div>
<div class="section">
<h1>Files List</h1>
<ul>
	<li><b>External.cs</b> - C# source of External.dll</li>
	<li><b>External.dll</b> - library for Python script execution</li>
	<li><b>ib.py</b> - IronBrowser</li>
	<li><b>README.html</b> - this file</li>
</ul>
</div>
<div class="section">
<h1>Dependences</h1>
<ul>
	<li><b>IronPython 1.1.1</b> - the implementation of the Python programming language on .NET</li>
</ul>
</div>
<div class="section">
<h1>Tutorial</h1>
Edit the file <code>ib.py</code> and change the <code>IB_DEFAULT_PAGE</code> with the path of this page, for example:
<pre>
IB_DEFAULT_PAGE = 'C:\\ironpython\\work\\IronBrowser\\README.html'
</pre>
Run IronBrowser on console (cmd)
<pre>
ipy ib.py
</pre>
If IronBrowser opens this page you can execute the next step.
<p>
This example print a text in the console<br>
<textarea id="helloworld" rows="3" cols="80">
print "Hello World!"
</textarea><br>
<button onclick="py('helloworld')">Run</button>
(see the console where IronBrowser runs)
</p>
<p>
<code>scriptInput</code> is the JavaScript input for the Python<br>
<code>scriptOutput</code> is the Python output for the JavaScript<br>
<textarea id="scriptInOut" rows="3" cols="80">
print scriptInput
scriptOutput = "Python output for the JavaScript"
</textarea><br>
<button onclick="alert(py('scriptInOut', 'JavaScript input for the Python'))">Run</button>
(see the console where IronBrowser runs)
</p>
<p>
This example invoke the JavaScript from Python<br>
<textarea id="invoke" rows="3" cols="80">
al = ArrayList(['Message for test function'])
self.browser.Document.InvokeScript("test", al.ToArray())
</textarea><br>
<button onclick="py('invoke')">Run</button>
</p>
</div>
</div>
</body>
</html>
